<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
	
<title>${ttopic}</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<jsp:include page="/public/header-meta.jsp"></jsp:include>
<link rel="stylesheet" href="${pageContext.request.contextPath}/ueditor/themes/default/css/umeditor.min.css" type="text/css"></link>
<script type="text/javascript"> 
$(document).ready(function() { 
  $("span.timeago").timeago();  
});  
</script> 
<jsp:include page="/public/header.jsp"></jsp:include>

</head>
	<body>
	<div id="wrap">
 		<div class="container" id="page-main">
			<div class="row"> 
				<div class="col-xs-12 col-sm-6 col-md-8">
					<div class="box" id="topics_index">
						<div class="header topic-head">
							<div class="pull-right">
				<a href="user!userDetails?uid=${t.bbsusers.uid}" class="profile_link" title="${t.bbsusers.uname}">
				<img alt="qeace medium avatar" class="medium_avatar" src="${t.bbsusers.avatar}"></a>
</div>
<p><a href="" >首页</a> <span class="text-muted">/</span> <a href="topic!listAll?section.sid=${t.bbssection.sid}">${t.bbssection.sname}</a></p>
<h3 id="topic_title">${t.ttopic}</h3>
<small class="topic-meta">By<a href="" class="dark startbbs profile_link" title="${t.bbsusers.uname}">${t.bbsusers.uname}</a>
at发表于
  <span class="timeago"
 	title="<fmt:formatDate	value="${t.ttime }"   					
    pattern="yyyy-MM-dd HH:mm:ss"/>">  </span>
• <a href="#reply_content">回复</a> • 
<a href="" title="点击收藏">收藏</a>
</small>
</div>
<div class="inner">
<div class="content topic_content">${t.tcontents}</div>
</div>
<div class="inner">
<div align="right" class="pull-right">
</div>
&nbsp;&nbsp;
</div>
<div class="box-header">
<div class="pull-right">
<a href="#reply" class="dark jump_to_comment">跳到回复</a>
</div>
<span  id="comments">${p.rows }</span> 回复
</div>
<s:iterator value="r" status="count">
<div class="fix_cell" id="saywrap">
<div id="clist">
<div class="cell hoverable reply" id="comment_988">
<div class="row">
<div class="col-md-1">
<a href="user!userDetails?users.uid=${bbsusers.uid}" class="profile_link" title="${bbsusers.uname }">
<img alt="ququjoy medium avatar" class="medium_avatar" src="${bbsusers.avatar }">
</a>
</div>
<div class="col-md-11">
<div>
<span class="pull-right" id="r1">
${count.count+(p.pn-1)*p.pagesize}楼： -
<c:if test="${user.umark!=0 }"><a href="#reply" class="clickable startbbs"  onclick="replyOne('${bbsusers.uname }');">回复</a>
</c:if>
<c:if test="${user.umark>0 }"><a href="screen?user.uid=${ruid}& rid=${rid}& rsid=${rid}&rtid=${rid}" class="clickable startbbs" >屏蔽</a>
</c:if>
</span>
<span><a href=" " class="dark startbbs profile_link" title="${bbsusers.uname }">${bbsusers.uname }</a></span>
发表于&nbsp;<span class="timeago time" title="<fmt:formatDate value="${rtime }" pattern="yyyy-MM-dd HH:mm"/>"></span>
</div>
<div class="content reply_content">${rcontent}<br>
		</div></div></div></div></div></div>
</s:iterator>
			<s:if test="list2.size()!=0">
			<s:include value="/public/page.jsp">
			<s:param name="actionname" value="'reply!view?topic.tid='+#request.t.tid"></s:param>
			</s:include>
			</s:if>
</div>
<a name="reply"></a>
<div class="box" >
<c:if test="${user.uname!=null }">
<div class="box-header">
<div class='pull-right'>
<a href="#top" class="dark back_to_top">回到顶部</a>
</div>
现在就添加一条回复
</div>
<div class="inner row">
<div id="msg">${msg}</div>
<!--<div class='alert alert-info'>如果标题已经包含你想说的话，内容可以留空。</div>-->
<form accept-charset="UTF-8" action="reply!addreply?section.sid=${t.bbssection.sid}&topic.tid=${t.tid}&users.uid=${user.uid}" id="new_reply" method="post"
 name="add_new" enctype="multipart/form-data">
<a href="" name="new_topic"></a>
<s:token/>
<div class="form-group" style="width:300px; margin-left: 15px; margin-top: 10px;">
</div>
<ul class="nav nav-tabs" style="margin-left: 15px; margin-right: 15px;border-bottom: 0px solid #999;height:20px">
</ul>
<div class="form-group"  id="reply">
<div class="col-md-12" id="textContain">
<textarea class="form-control" id="reply_content" name="rcontent" rows="10"  style="width:770;height:240px;">
</textarea>
<span class="text-muted" style="float:right">(可直接粘贴链接和图片地址/发代码用&lt;pre&gt;标签)</span>
</div>
</div>
<div class="col-sm-9">
<input class="btn btn-primary"  name="commit" type="submit" value="发表">
<small class="gray">(支持 Ctrl + Enter 快捷键)</small>
</div>
<!--添加 ueditor  -->
 <script type="text/javascript" charset="utf-8" src="${pageContext.request.contextPath}/ueditor/umeditor.config.js"></script>
<script type="text/javascript" charset="utf-8" src="${pageContext.request.contextPath}/ueditor/umeditor.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/ueditor/lang/zh-cn/zh-cn.js"></script>
<script type="text/javascript">
    //实例化编辑器
    //建议使用工厂方法getEditor创建和引用编辑器实例，如果在某个闭包下引用该编辑器，直接调用UE.getEditor('editor')就能拿到相关的实例
       //实例化编辑器
    var um = UM.getEditor('reply_content');
</script>
</form>

</div> 
</c:if>
<c:if test="${user.uname==null}">

<div class="box-header">
<div class="pull-right">
<a href="#top" class="dark back_to_top">回到顶部</a>
</div>
现在就添加一条回复
</div>
<div class="inner row">
<div style="text-align: center;">
<p>欢迎访问开心吧微社区</p>
<p><a class="btn btn-default" href="Userlogin.jsp">登录发表</a></p>
<p><a href="Ureg.jsp">还没有账号？去注册</a></p>
</div>
 </div>
</c:if>
</div>
</div>
		<div class="col-xs-12 col-sm-6 col-md-4" id="Rightbar">
			<jsp:include page="/public/right_login.jsp"></jsp:include>
		</div>
</div>
</div>
</div>
<div class="clearfix"></div>
<jsp:include page="/public/footer.jsp"></jsp:include>


